#include "ThreadSearchViewManagerBase.h"
#include "ThreadSearchViewManagerMessagesNotebook.h"
#include "ThreadSearchViewManagerLayout.h"

ThreadSearchViewManagerBase* ThreadSearchViewManagerBase::BuildThreadSearchViewManagerBase(
  ThreadSearchView* pView,
  bool addViewToManager,
  eManagerTypes   managerType ) {
  ThreadSearchViewManagerBase* pMgr = 0;
  if( managerType == TypeMessagesNotebook ) {
    pMgr = new ThreadSearchViewManagerMessagesNotebook( pView );
  } else {
    pMgr = new ThreadSearchViewManagerLayout( pView );
  }
  if( addViewToManager == true ) {
    pMgr->AddViewToManager();
  }
  return pMgr;
}
